package com.xu.cloud.common.pojo.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/*
请求阻止信息表sql:
CREATE TABLE `request_blocking_info`
(
    `id`             bigint                           NOT NULL COMMENT '主键',
    `blocking_type`  varchar(2) COLLATE utf8mb4_bin   NOT NULL COMMENT '阻止类型, 00IP地址, 01手机号, 02用户id',
    `blocking_value` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '阻止值, IP地址, 手机号, 用户id ...',
    `blocking_count` bigint      DEFAULT 0 COMMENT '阻止次数',
    `blocking_time`  datetime    DEFAULT NULL COMMENT '阻止截止时间',
    `deleted`        tinyint     DEFAULT 0 COMMENT '是否删除, 0未删除, 1已删除',
    `create_user`    varchar(64) DEFAULT NULL COMMENT '创建用户',
    `create_time`    datetime    DEFAULT NULL COMMENT '创建时间',
    `update_user`    varchar(64) DEFAULT NULL COMMENT '修改用户',
    `update_time`    datetime    DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `udx_bt_bv` (`blocking_type`, `blocking_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='请求阻止信息表';
 */

/**
 * <p>
 * 请求阻止信息表
 * </p>
 *
 * @author xuguan
 * @since 2024-12-23
 */
@Data
@TableName("request_blocking_info")
@ApiModel(value = "RequestBlockingInfoDO对象", description = "请求阻止信息表")
public class RequestBlockingInfoDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId("id")
    private Long id;

    @ApiModelProperty("阻止类型, 00IP地址, 01手机号, 02用户id")
    @TableField("blocking_type")
    private String blockingType;

    @ApiModelProperty("阻止值, IP地址, 手机号, 用户id ...")
    @TableField("blocking_value")
    private String blockingValue;

    @ApiModelProperty("阻止次数")
    @TableField("blocking_count")
    private Long blockingCount;

    @ApiModelProperty("阻止截止时间")
    @TableField("blocking_time")
    private LocalDateTime blockingTime;

    @ApiModelProperty("是否删除, 0未删除, 1已删除")
    @TableField("deleted")
    private Integer deleted;

    @ApiModelProperty("创建用户")
    @TableField("create_user")
    private String createUser;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改用户")
    @TableField("update_user")
    private String updateUser;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
